package cn.leftsite.java11;

import java.util.Optional;

public class OptionalDemo {
    public static void main(String[] args) {
        Optional<Object> optional = Optional.ofNullable(null);
        System.out.println(optional.orElse("abc"));

        Object o = optional.orElseThrow();
        System.out.println(o);
    }
}
